<!DOCTYPE html>
<html lang="zh">

<head>
	<link rel="icon" href="https://qzonestyle.gtimg.cn/aoi/img/logo/favicon.ico"> 
	<meta charset="utf-8" name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
	<title>QQ空间备份-分享</title>
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" integrity="sha256-eZrrJcwDc/3uDhsdt61sL2oOBY362qM3lon1gyExkL0=" crossorigin="anonymous">
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
	<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/lightgallery@1.6.14/dist/css/lightgallery.min.css" integrity="sha256-8rfHbJr+ju3Oc099jFJMR1xAPu8CTPHU8uP5J3X/VAY=" crossorigin="anonymous">
	<link rel="stylesheet" type="text/css" href="../common/css/common.css">
	<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.0/dist/jquery.min.js" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ=" crossorigin="anonymous"></script>
	<script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
	<script src="https://cdn.jsdelivr.net/npm/bootstrap@4.4.1/dist/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
	<script src="https://cdn.jsdelivr.net/npm/lightgallery@1.6.14/dist/js/lightgallery-all.min.js" integrity="sha256-0q70xbZ3GMwdiseCj/wfChJhq/3wzpNdgZinlSxSw14=" crossorigin="anonymous"></script>
	<script src="https://cdn.jsdelivr.net/npm/jquery-mousewheel@3.1.13/jquery.mousewheel.min.js"></script>
	<script src="https://cdn.jsdelivr.net/npm/lazyload@2.0.0-rc.2/lazyload.js"></script>
	<script type="text/javascript" src="../common/json/shares.js"></script>
	<script type="text/javascript" src="../common/js/template.js"></script>
	<script type="text/javascript" src="../common/js/common.js"></script>
	<script type="text/javascript" src="../common/js/sidebar.js"></script>
	<script type="text/javascript" src="../common/js/shares.js"></script>
</head>

<body>
	<header>
		<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-dark">
			<a class="navbar-brand" target="_blank" href="https://github.com/ShunCai/QZoneExport">QQ空间导出助手</a>
			<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
				<span class="navbar-toggler-icon"></span>
			</button>
			<div class="collapse navbar-collapse" id="navbarSupportedContent">
				<nav aria-label="breadcrumb">
					<ol class="breadcrumb bg-dark">
						<li class="breadcrumb-item"><a href="../index.html">个人中心</a></li>
						<li class="breadcrumb-item active" aria-current="page">分享</li>
					</ol>
				</nav>
			</div>
		</nav>
	</header>
	<main role="main" class="flex-shrink-0">
		<div id="shares_html" class="container messages">
			<%/* 遍历年份 */%>
			<%for (var yearMap of sharesMaps) {%>
				<%/* 年份 */%>
				<span class="sidebar-h1" data-tag="h1" data-sidebar="<%:=yearMap[0]%>年"></span>
				<%for (var monthMap of yearMap[1]) {%>
					<%/* 月份 */%>
					<span class="sidebar-h2" data-tag="h2" data-sidebar="<%:=monthMap[0]%>月"></span>
					<%/* 月份数据 */%>
					<%for (let index = 0; index < monthMap[1].length; index++) {%>
						<%const share = monthMap[1][index]%>
						<%total = total -1%>
						<div class="card w-70 mt-3 border">
							<div class="card-body">
								<div class="p-1 comments">
									<div class="container comment  m-1 p-0">
										<a class="me-a avatar p-0 m-0" target="_blank" href="<%:=API.Common.getUserUrl(share.uin)%>">
											<img class="w-100 h-100 border rounded-circle" src="<%:=API.Common.getUserLogoUrl(share.uin)%>">
										</a>
										<div class="ml-4">
											<div class="messageText ml-4 container m-2">
												<%/* 分享描述 */%>
												<p><a target="_blank" href="<%:=API.Common.getUserUrl(share.uin)%>"><%:=API.Common.formatContent(share.nickname)%></a> <span class="text-secondary">分享<span class="border-warning border rounded text-warning small p-1"><%:=API.Shares.getDisplayType(share.type)%></span>：</span><%:=API.Common.formatContent(share.desc, "HTML", false, false)%></p>
												<%/* 分享源标题 */%>
												<%if(share.source && share.source.title){%>
													<p>《<a target="_blank" href="<%:=share.source.url%>"><%:=share.source.title%></a>》</p>
												<%}%>
												<%/* 分享源描述 */%>
												<%if(share.source && share.source.desc){%>
													<p><%:=API.Common.formatContent(share.source.desc, "HTML", false, false)%></p>
												<%}%>
												<%/* 分享内容 */%>
												<%/* 多媒体内容 */%>
												<div class="medias row p-3 lightgallery">
													<%/*  分享源图片 */%>
													<%if(share.source.images){%>
														<%for(let image of share.source.images){%>
															<a class="medias-item border message-lightbox" data-src="<%:=(image.custom_filepath || image.custom_url)%>">
																<img class="lazyload w-100 h-100" data-src="<%:=(image.custom_filepath || image.custom_url)%>">
															</a>
														<%}%>
													<%}%>
												</div>
												<%/* 分享评论 */%>
												<%if(share.comments && share.comments.length > 0){%>
													<%/* 遍历评论 */%>
													<%for(let comment of share.comments){%>
														<div class="p-1 border-top comments mt-3">
															<div class="container comment  m-1 p-0">
																<a class="me-a avatar p-0 m-0" target="_blank" href="<%:=API.Common.getUserUrl(comment.poster.id)%>">
																	<img class="lazyload w-100 h-100 border rounded-circle" data-src="<%:=API.Common.getUserLogoUrl(comment.poster.id)%>" >
																</a>
																<div class="ml-4">
																	<%/* 评论 */%>
																	<div class="container ml-4">
																		<a class="author">
																			<a target="_blank" href="<%:=API.Common.getUserUrl(comment.poster.id)%>">
																				<span><%:=API.Common.formatContent(comment.poster.name)%></span>
																			</a>
																			<%if(comment.private){%>
																				<span class="text-info"> 私密评论 </span>
																			<%}%>
																			<br>
																			<span class="text-muted small"><%:=API.Utils.formatDate(comment.postTime)%></span>
																		</a>
																	</div>
																	<div class="messageText ml-4 container m-1">
																		<%/* 评论内容 */%>
																		<p><%:=API.Common.formatContent(comment.content)%></p>
																		<%/* 评论图片 */%>
																		<%if(comment.pic){%>
																			<%for(let image of comment.pic){%>
																				<img src="<%:=(image.custom_filepath || image.custom_url)%>" class="comment-img img-thumbnail">
																			<%}%>
																		<%}%>
																	</div>
																	<%/* 评论回复 */%>
																	<%if(comment.replies){%>
																		<%for(let reply of comment.replies){%>
																			<div class="comments m-1">
																				<div class="container comment  m-3 p-0">
																					<a class="me-a avatar p-0 m-0 " target="_blank" href="<%:=API.Common.getUserUrl(reply.poster.id)%>">
																						<img class="lazyload w-100 h-100 border rounded-circle" data-src="<%:=API.Common.getUserLogoUrl(reply.poster.id)%>">
																					</a>
																					<div class=" ml-4  ">
																						<div class="container ml-4">
																							<a class="author">
																								<a target="_blank" href="<%:=API.Common.getUserUrl(reply.poster.id)%>">
																									<span class="text-info"><%:=API.Common.formatContent(reply.poster.name)%></span>
																								</a>
																								<%if(reply.private){%>
																									<span class="text-info"> 私密回复 </span>
																								<%}%>
																								<br>
																								<span class="text-muted small"><%:=API.Utils.formatDate(reply.postTime)%></span>
																							</a>
																						</div>
																						<div class="messageText ml-4 container m-1">
																							<%/* 回复内容 */%>
																							<p><%:=API.Common.formatContent(reply.content)%></p>
																							<%/* 回复图片 */%>
																							<%if(reply.pic){%>
																								<%for(let image of reply.pic){%>
																									<img src="<%:=(image.custom_filepath || image.custom_url)%>" class="comment-img img-thumbnail">
																								<%}%>
																							<%}%>
																						</div>
																					</div>
																				</div>
																			</div>
																		<%}%>
																	<%}%>
																</div>
															</div>
														</div>
													<%}%>
												<%}%>
											</div>
											<%/* 分享源来源 */%>
											<%if(share.source && share.source.from){%>
												<ul class="list-group list-group-flush ml-3">
													<li class="list-group-item">
														<%if(share.source.from.name){%>
															<span class="text-secondary">来自<a target="_blank" href="<%:=share.source.from.url%>"><%:=share.source.from.name%></a> </span>
														<%}%>
														<span class="text-secondary">共分享<%:=share.source.count%>次</span>
													</li>
												</ul>
											<%}%>
										</div>
									</div>
								</div>
							</div>
							<div class="card-footer text-muted">
								<%:=API.Utils.formatDate(share.shareTime)%>
								<span class="border-primary border rounded text-primary small p-1 float-right" title="当前楼层">#<%:=total + 1 %></span>
								<span class="text-primary p-1 float-right fa fa-thumbs-up mr-2 cursor viewlikes" title="点赞列表" data-field="id" data-target="<%:=share.id%>"><%:=share.likeTotal || 0 %></span>
								<span class="text-primary p-1 float-right fa fa-eye mr-2 cursor viewVisitors" title="最近访问" data-field="id" data-target="<%:=share.id%>"><%:=share.custom_visitor && share.custom_visitor.viewCount || 0 %></span>
							</div>
						</div>
					<%}%>
				<%}%>
			<%}%>
		</div>
	</main>
</body>

</html>